const routes = [
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    redirect: '/login',
  },
  {
    path: '/login',
    component: () => import('pages/LoginPage.vue')
  },
  {
    path: '/sys',
    component: () => import('layouts/SysLayout.vue'),
    redirect: '/sys/user',
    children: [
      {path: 'user', component: () => import('pages/sys/UsersPage.vue')},
      {path: 'project', component: () => import('pages/sys/ProjectsPage.vue')},
      {path: 'config', component: () => import('pages/sys/UserConfig.vue')},
    ]
  },
  {
    path: '/t',
    component: () => import('layouts/TeacherLayout.vue'),
    redirect: '/t/index',
    children: [
      {path: 'index', component: () => import('pages/teacher/IndexPage.vue')},
      {path: 'project', component: () => import('pages/teacher/ProjectPage.vue')},
      {path:'config',component:()=>import('pages/teacher/TeacherConfig.vue')}
    ]
  },
  {
    path:'/a/',
    component:()=>import('layouts/AdminLayout.vue'),
    redirect:'/a/index',
    children:[
      {path:'index',component:()=>import('pages/admin/IndexPage.vue')},
      {path:'tea',component:()=>import('pages/admin/TeacherPage.vue')},
      {path:'stu',component:()=>import('pages/admin/StudentPage.vue')},
      {path:'config',component:()=>import('pages/admin/TeacherConfig.vue')},
      {path: 'batch', component: () => import('pages/admin/BatchInsertPage.vue')},
      ]
  },
  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/ErrorNotFound.vue')
  }
]

export default routes
